import service from '@/utils/request'

export const getBgqList = (params) => {
  return service({
    url: '/manager/oa/list',
    method: 'get',
    params
  })
}

export const deleteBgq = (id) => {
  return service({
    url: `/manager/oa/delete/${id}`,
    method: 'post'
  })
}

export const createBgq = (data) => {
  return service({
    url: '/manager/oa/add',
    method: 'post',
    data
  })
}

export const updateBgq = (data) => {
  return service({
    url: '/manager/oa/edit',
    method: 'post',
    data
  })
}

export const getAllBgqList = (params) => {
  return service({
    url: '/manager/oa/all',
    method: 'get',
    params
  })
}

export const getLouDongList = (params) => {
  return service({
    url: '/manager/building/list',
    method: 'get',
    params
  })
}

export const deleteLouDong = (id) => {
  return service({
    url: `/manager/building/delete/${id}`,
    method: 'post'
  })
}

export const createLouDong = (data) => {
  return service({
    url: '/manager/building/add',
    method: 'post',
    data
  })
}

export const updateLouDong = (data) => {
  return service({
    url: '/manager/building/edit',
    method: 'post',
    data
  })
}

export const getQuanShuList = (id) => {
  return service({
    url: `/manager/building/ownership/${id}`,
    method: 'get'
  })
}

export const deleteQuanShu = (id) => {
  return service({
    url: `/manager/building/ownership/delete/${id}`,
    method: 'post'
  })
}

export const createQuanShu = (data) => {
  return service({
    url: '/manager/building/ownership/add',
    method: 'post',
    data
  })
}

export const updateQuanShu = (data) => {
  return service({
    url: '/manager/building/ownership/edit',
    method: 'post',
    data
  })
}

export const setPicture = (data) => {
  return service({
    url: '/manager/building/set/picture',
    method: 'post',
    data
  })
}

export const getBuildingFloors = (id) => {
  return service({
    url: `/manager/building/floors/${id}`,
    method: 'get'
  })
}

export const savePicture = (data) => {
  return service({
    url: '/manager/building/floor/save/picture',
    method: 'post',
    data
  })
}

export const removePicture = (id) => {
  return service({
    url: `/manager/building/floor/remove/picture/${id}`,
    method: 'post'
  })
}

export const getFangJianList = (id,params) => {
  return service({
    url: `/manager/building/room/${id}`,
    method: 'get',
    params
  })
}

export const deleteFangJian = (id) => {
  return service({
    url: `/manager/building/room/delete/${id}`,
    method: 'post'
  })
}

export const createFangJian = (data) => {
  return service({
    url: '/manager/building/room/add',
    method: 'post',
    data
  })
}

export const updateFangJian = (data) => {
  return service({
    url: '/manager/building/room/edit',
    method: 'post',
    data
  })
}

export const getJsxmList = (params) => {
  return service({
    url: '/manager/construction/list',
    method: 'get',
    params
  })
}

export const deleteJsxm = (id) => {
  return service({
    url: `/manager/construction/delete/${id}`,
    method: 'post'
  })
}

export const createJsxm = (data) => {
  return service({
    url: '/manager/construction/add',
    method: 'post',
    data
  })
}

export const updateJsxm = (data) => {
  return service({
    url: '/manager/construction/edit',
    method: 'post',
    data
  })
}

export const getJsywList = (params) => {
  return service({
    url: '/manager/business/room/list',
    method: 'get',
    params
  })
}

export const deleteJsyw = (id) => {
  return service({
    url: `/manager/business/room/delete/${id}`,
    method: 'post'
  })
}

export const createJsyw = (data) => {
  return service({
    url: '/manager/business/room/add',
    method: 'post',
    data
  })
}

export const updateJsyw = (data) => {
  return service({
    url: '/manager/business/room/edit',
    method: 'post',
    data
  })
}

